﻿document.write('<div id="FlAD" style="display:none; width:315px;height:180px;position:absolute;z-index:9999;left: 100; top: 90; background:#000 url(images/pic-shengri.jpg);" onMouseOver="pause_resume()" onMouseOut="start()"><div onClick="hidead();" style="font-size: 9pt; cursor: pointer;color:#000;width:40px;height:32px;line-height:22px;float:right;" align="right"></div><div style="display:block;margin:auto auto;width:300px;line-height:26px;text-align:center;padding:25px 0px 0px 0px;*padding:0px 0px 0px 0px;color:#fff;font-size:18px;font-weight:bold;" id="birthdayUserBox">生日快乐!</div><div class="clear_ling">&nbsp;&nbsp;&nbsp;&nbsp;</div></div>');

//------------飘窗代码-----------------
var img = document.getElementById('FlAD');
var xPos = 200;
var yPos = 200;
var step = 2;
var delay = 40;
var height = 0;
var Hoffset = 0;
var Woffset = 0;
var yon = 0;
var xon = 0;
var pause = true;
var interval;
var obj = document.getElementById('FlAD')
img.style.top = yPos;
function changePos() {
	width = document.documentElement.clientWidth
			|| document.documentElement.clientWidth;
	height = document.documentElement.clientHeight
			|| document.documentElement.clientHeight;
	scrollLeft = document.documentElement.scrollLeft
			|| document.documentElement.scrollLeft;
	scrollTop = document.documentElement.scrollLeft
			|| document.documentElement.scrollTop;
	Hoffset = img.offsetHeight;
	Woffset = img.offsetWidth;
	img.style.left = xPos + scrollLeft + 'px';
	img.style.top = yPos + scrollTop + 'px';
	if (yon) {
		yPos = yPos + step;
	} else {
		yPos = yPos - step;
	}
	if (yPos < 0) {
		yon = 1;
		yPos = 0;
	}
	if (yPos >= (height - Hoffset)) {
		yon = 0;
		yPos = (height - Hoffset);
	}
	if (xon) {
		xPos = xPos + step;
	} else {
		xPos = xPos - step;
	}
	if (xPos < 0) {
		xon = 1;
		xPos = 0;
	}
	if (xPos >= (width - Woffset)) {
		xon = 0;
		xPos = (width - Woffset);
	}
}
function start() {
	img.visibility = "visible";
	interval = setInterval('changePos()', delay);
}
function pause_resume() {
	clearInterval(interval);
}
function hidead() {
	obj.style.display = 'none';

}
//start();
//------------飘窗代码END-----------------


$("#FlAD").show();
$("#birthdayUserBox").prepend("徐连国,夏家旺,朱爱国,傅洋洋,张玉亭,李六荣,马肖京,周传宝")
start();
